import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'
import shoppingCartModule from './modules/cart'
import userModule from './modules/user'

Vue.use(Vuex)

const store = new Vuex.Store({
  strict: true,
  plugins: [createPersistedState()],
  modules: {
    shoppingCart: shoppingCartModule,
    user: userModule,
  },
})

export default store
